[vars]
filesize=1242186
sha512=3260be0d1a9a7c5eb0dbb87179a9a9521fdfc7809ca51f13ee5a37ba5e63d21ad50a4249ec7d3929a9d0ce8c8f6cf302558743964f0f7ff742efe283b91df9de
desc='the standard build tool for *nix source packages'

[deps]
kernel-headers

[deps.host]
stage0_musl

[mirrors]
http://ftp.gnu.org/gnu/make/make-3.82.tar.bz2

[build]
[ "$STAGE" = "0" ] && CC="$butch_root_dir"/bin/musl-gcc
patch -p1 < "$K"/make-3.82-upstream_fixes-3.patch
patch -p1 < "$K"/make-3.82-stack_limit.patch

[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"

CFLAGS="-D_GNU_SOURCE $optcflags" LDFLAGS="$optldflags -static" \
./configure -C --prefix="$butch_prefix" $xconfflags --disable-nls
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
